package com.zmc.lostfound.post.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author zmc
 * @description 用户发布评论请求体
 */
@Data
@NoArgsConstructor
@ApiModel("用户发布评论请求体")
public class CommentPublishVO implements Serializable {

    private static final long serialVersionUID = -1826917304423823484L;

    /**
     * 父评论id
     */
    @ApiModelProperty("父评论id")
    @Min(value = 1, message = "父评论id必须大于等于1")
    private Long parentId;

    /**
     * 评论树层级
     */
    @ApiModelProperty("评论树层级")
    @Min(value = 1, message = "评论树层级必须大于等于1")
    private Integer treeLevel;

    /**
     * 发评用户id
     */
    @ApiModelProperty("发评用户id")
    @NotNull(message = "发评用户id不能为空")
    @Min(value = 1, message = "发评用户id必须大于等于1")
    private Long userId;

    /**
     * 帖子id
     */
    @ApiModelProperty("帖子id")
    @NotNull(message = "帖子id不能为空")
    @Min(value = 1, message = "帖子id必须大于等于1")
    private Long postId;

    /**
     * 评论内容
     */
    @ApiModelProperty("评论内容")
    @NotBlank(message = "评论内容不能为空")
    private String content;

}
